
<!-- 猜您喜欢 -->
<div class="you_like_item hide">
    <div class="list_title">
        <img src="/statics/wechat/images/item_icon3.png">
        <span>猜您喜欢</span>
        <a>根据您的浏览记录，精心为您推荐</a>
    </div>  
    <div class="you_like_list">
        <ul></ul>
        <div class="clear_float"></div>
    </div>
</div>
<script type="text/javascript">
    var page = 1;
    $(function(){
        maybe();
    });
    //猜你喜欢
    function maybe()
    {
        $.ajax({
            type:"GET",
            dataType: "json",
            url: "<?php echo $this->getController()->createUrl('/site/maybe')?>",
            data:{'page':page},
            success: function(json){
                page +=1;
                if (json != '' && json != 0) {
                    $('.recommend_goods_list').empty();
                    $(".you_like_item").removeClass("hide");
                    $(json).each(function(i){
                        $('.you_like_list ul').append("<li><a href='/mobile/goods/detail?sid="+json[i]['goods_id']+"'>"+
                                                                    "<div class='img_box'><img src='"+json[i]['cover']+"'></div>"+
                                                                    "<p class='goods_name shen_lue'>"+json[i]['name']+"</p>"+
                                                                    "<p class='goods_price'>￥"+json[i]['price']+"</p>"+
                                                                    "<span>"+json[i]['old_price']+"</span>"+
                                                                "</a></li>");
                    })
                }
                var w = $(".you_like_list li .img_box").width();
                $(".you_like_list li .img_box").height(w);
            },
            error:function(e){

            }
        });
    }
</script>